﻿
/****** Object:  User Defined Function dbo.SpaceString    Script Date: 10/14/2009 10:39:06 PM ******/

CREATE function SpaceString( @inString varchar(100) ) 
returns varchar(100)
as 
begin
	declare @i int
	declare @retString varchar(100)
	
	set @i = 1
	set @retString = ''
	while @i < len( @inString )
	begin
		set @retString = @retString + substring( @inString, @i, 1 ) + ' '
		set @i = @i + 1
	end
	set @retString = @retString + substring( @inString, @i, 1 )
	
	return @retString
end

